merge_conflicts

#!/usr/bin/env bash

source ./bin/bent source

conflicts="$(merge_conflicts)"
str_split_line "$conflicts" lines

clean_lines=()
for line in "${lines[@]}"; do
    ## remove the parent directory name
    clean_lines+=("${line##*/}")
done

fails=()

test0="merge_conflict_file has a merge conflict"
if [[ "${clean_lines[0]}" != "$test0" ]];then
    fails+=("'${clean_lines[0]}' did not match '$test_0'}")
fi

test1="merge_conflict_file2 has a merge conflict"
if [[ "${clean_lines[1]}" != "$test1" ]];then
    fails+=("'${clean_lines[1]}' did not match '$test_1'}")
fi




fail_count=${#fails[@]}
echo "$fail_count tests failed"
exit $fail_count